<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 编写一个函数求两个数字之间有多少个质数 例如：fn(100, 200) ，在控制台输出 100 - 200 之间的所有质数 -->
     <script>
        var fn = function(a,b){
            for (var i = a; i<=b; i++){
            var a = i; 
            var flag = true;
            
            for(var i = 2; i<a; i++){
                if(a%i ==0){
                    flag = false;
                }
            }
            if(flag){
                console.log(a+"是质数");
                console.log(true);
             }
    }
}    
      fn(400,500);  
     </script>
</body>
</html>